package com.atstudy.headline.web.admin.service.impl;

import com.atstudy.headline.entity.Comments;
import com.atstudy.headline.web.admin.mapper.CommentsMapper;
import com.atstudy.headline.web.admin.service.CommentsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collection;
import java.util.List;

@Service
public class CommentsServiceImpl
        extends ServiceImpl<CommentsMapper, Comments>  // 关键修复：继承MyBatis Plus的基类
        implements CommentsService {

    @Autowired
    private CommentsMapper commentsMapper;

    @Override
    public List<Comments> list() {
        return commentsMapper.selectList(null);
    }

    // 不再需要手动实现saveBatch()方法
    // ServiceImpl基类已提供默认实现
}